package org.sgroup.imenu.service;

public class IMenuService {
	private static final String ServiceURL ="http://tienlen13.softindex.info/v2/iMenuWS.asmx?WSDL";
	private static final String NAMESPACE="http://codex13.com.vn/";
	private static final String confirmOrder_MethodName="confirmOrder";
	private static final String getAll_MethodName="getAll";
	private static final String getImage_MethodName="getImage";
	private static final String getOrderList_MethodName="getOrderList";
	public String getAll(String input)
	{
		try{
			//String input ="<input user=\"lbnam\" pass=\"123456\"/>";
			String result = WebserviceHelper.InvokeWebmethod(ServiceURL, getAll_MethodName, NAMESPACE,
				new String[]{"input"}, new String[]{input}).toString();
			return result;
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return "";
		}
	}
	public String getImage(String input)
	{
		try{
			//String input ="<input user=\"lbnam\" pass=\"123456\"/>";
			String result = WebserviceHelper.InvokeWebmethod(ServiceURL, getImage_MethodName, NAMESPACE,
				new String[]{"filename"}, new String[]{input}).toString();
			return result;
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return "";
		}
	}
	public String confirmOrder(String input)
	{
		try{
			//String input ="<input user=\"lbnam\" pass=\"123456\"/>";
			String result = WebserviceHelper.InvokeWebmethod(ServiceURL, confirmOrder_MethodName, NAMESPACE,
				new String[]{"input"}, new String[]{input}).toString();
			return result;
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return "";
		}
	}
	public String getOrderList(String input)
	{
		try{
			//String input ="<input user=\"lbnam\" pass=\"123456\"/>";
			String result = WebserviceHelper.InvokeWebmethod(ServiceURL, getOrderList_MethodName, NAMESPACE,
				new String[]{"input"}, new String[]{input}).toString();
			return result;
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return "";
		}
	}
	
	
}
